package bb.lanxing.lib.devices.bici.cmd;

//import com.umeng.analytics.pro.cc;
import bb.lanxing.lib.devices.bici.BLECommand;
import java.nio.ByteBuffer;
import java.util.Map;

public class AckPacket extends BLECommand {
    @Override
    protected byte[] encodeCMDBody(Map<Byte, Object> map) {
        return new byte[0];
    }

    public AckPacket(byte[] bArr) {
        super(bArr);
    }

    @Override
    public void parseBody(byte[] bArr) {
        ByteBuffer wrap = ByteBuffer.wrap(bArr);
        this.l1Magic = wrap.get();
        byte b = wrap.get();
        byte b2 = 1;
        this.l1AckFlag = (b & (byte) 16) > 0 ? (byte) 1 : (byte) 0; //cc.n
        if ((b & 32) <= 0) {
            b2 = 0;
        }
        this.l1ErrFlag = b2;
        this.l1PayloadLen = wrap.getShort();
        this.l1CRC = wrap.getShort();
        this.l1SequenceId = wrap.getShort();
    }
}
